package com.woniu.thread;

/**
 * @author zhaolei
 * @date 2021/5/7 - 19:59
 */
public class ThreadDemo3 {
    public static void main(String[] args) {
        new Thread(new Runnable() {
            public void run() {
                for (int i = 0; i <10 ; i++) {
                    System.out.println(Thread.currentThread().getName() + "--第" + (i + 1) + "次执行");
                }
            }
        }).start();
        new Thread(new Runnable() {
            public void run() {
                for (int i = 0; i <10 ; i++) {
                    System.out.println(Thread.currentThread().getName() + "--第" + (i + 1) + "次执行");
                }
            }
        }).start();
    }
}
